<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>ThinkJS的第一个例子</title>
    <link href="/static/css/base.css" rel="stylesheet" />
    <script type="text/javascript" src="/static/js/jquery.min.js"></script>
    <style>
        * {
            padding: 0;
            margin: 0;
            font-size: 16px;
            line-height: 20px;
            font-family: arial;
        }
        
        a,
        a:visited {
            color: #337ab7;
            text-decoration: none;
        }
        
        header {
            padding: 70px 0 70px 0;
            background-color: #4A6495
        }
        
        h1 {
            font-size: 36px;
            color: #fff;
            font-weight: normal;
        }
        
        code {
            padding: 2px 4px;
            font-size: 90%;
            color: #c7254e;
            background-color: #f9f2f4;
            border-radius: 4px;
        }
        
        .content {
            width: 1000px;
            margin: auto
        }
        
        .wrap {
            width: 1000px;
            margin: auto
        }
        
        .content {
            margin-top: 80px;
        }
        
        .list {
            width: 800px;
        }
        
        .list .item {
            position: relative;
            padding-left: 70px;
            margin-top: 50px;
        }
        
        .list .item .step {
            position: absolute;
            width: 36px;
            height: 36px;
            top: -3px;
            left: 0;
            border: 5px solid #4A6495;
            border-radius: 23px;
            text-align: center;
            line-height: 36px;
        }
        
        .list .item h2 {
            font-size: 24px;
            font-weight: normal;
        }
        
        .list .item p {
            line-height: 30px;
            margin-top: 10px
        }
    </style>
    <script src="/static/js/main.js"></script>
</head>

<body>
    <header>
        <div class="wrap">
            <!-- <img src="/static/img/timg.jpg" alt="" style="width: 100px;"> -->
            <%for(var i=0;i <datas.length;i++){%>
                <p>
                    <span><%=datas[i].name%></span>
                    <span><%=datas[i].tel%></span>
                </p>
                <%}%>
                    <h1>A New App Created By ThinkJS</h1>
        </div>
    </header>
    <div class="content">
        <div class="list">
            <div class="item">
                <div class="step">1</div>
                <h2>Generate Files</h2>
                <p>Run <code>thinkjs</code> command to create module, controler, model, service and so on. visit <a href="https://thinkjs.org/doc/thinkjs_command.html">https://thinkjs.org/doc/thinkjs_command.html</a> to view more infomation.</p>
            </div>
            <div class="item">
                <div class="step">2</div>
                <h2>Documentation</h2>
                <p>ThinkJS has html and pdf documents. visit <a href="https://thinkjs.org/doc.html">https://thinkjs.org/doc.html</a></p>
            </div>
            <div class="item">
                <div class="step">3</div>
                <h2>《《《？？？WebSocket请求</h2>
                <p>ThinkJS support <code>socket.io</code> and <code>sockjs</code> WebSocket client and server node. visit <a href="https://thinkjs.org/doc/adapter_websocket.html">https://thinkjs.org/doc/adapter_websocket.html</a></p>
            </div>
        </div>
    </div>
</body>
<script type="text/javascript">
    $.ajax({
        type: 'GET',
        url: '/ticket',
        success: function(res) {
            //console.log('res', res)
            if (!res.errno) {
                // console.log('第三方使用的接口', res.data)
            }
        },
        error: function(res) {
            //console.log('res', res)
        }
    });

    var getList = function() {
        $.ajax({
            type: 'GET',
            url: '/index/list',
            success: function(res) {
                //console.log('res', res)
            },
            error: function(res) {
                //console.log('res', res)
            }
        });
    }
    getList();
</script>

</html>
